#include <iostream>
#include <vector>
#include <sstream>
#include <algorithm>

int main()
{
    std::string str;
    std::getline(std::cin, str);

    std::istringstream iss(str);
    std::vector<int> nums;
    int n;
    while (iss >> n)
    {
        nums.push_back(n);
    }

    std::vector<int> scores(nums.size(), 0);
    int total = 0;
    for (int i = 0; i < nums.size(); i++)
    {
        total += nums[i];
        if (total >= 100)
        {
            scores[i] = 100;
            for (int j = 0; j < i; j++)
            {
                scores[i] -= (i - j) * nums[j];
            }
            total = 0;
        }
        else
        {
            scores[i] = nums[i];
            for (int j = 0; j < i - 1; j++)
            {
                scores[i] -= (i - j - 1) * nums[j];
            }
        }
    }

    std::cout << *std::max_element(scores.begin(), scores.end()) << std::endl;

    return 0;
}